package cmm;

public class TaskEntry implements ITaskEntry {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6568886163943216128L;

	private Integer AssignedServerID;
	
	private TaskContext Context;
	
//  -----------------------------------------------------------------------------------------	
	
	// hope this works
//	public TaskEntry(TaskEntry entry){
//		AssignedServerID = new Integer(entry.getAssignedServerID());
//		Context = new TaskContext(entry.getContext());
//	}
	
	public TaskEntry(Integer AssignedServerID, TaskContext Context){
		
		this.AssignedServerID = AssignedServerID;
		this.Context = Context;
	}
	
	public TaskEntry clone() throws CloneNotSupportedException {
		TaskEntry NewEntry = (TaskEntry) super.clone();
		NewEntry.AssignedServerID = new Integer(this.getAssignedServerID());
		NewEntry.Context = (TaskContext) Context.clone();
		
		return NewEntry;
	}
	
	public Integer getAssignedServerID() {

		return AssignedServerID;
	}

	public TaskContext getContext() {

		return Context;
	}

	public void putAssignedServerID(Integer AssignedServerID) {

		this.AssignedServerID = AssignedServerID;
	}

	public void putContext(TaskContext Context) {

		this.Context = Context;
	}

}
